package do

import (
	"inspector/pkg/validation"
)

type CallbackParams struct {
	Code           string `form:"code" binding:"required"`
	InstallationID string `form:"installation_id"`
	SetupAction    string `form:"setup_action"`
}

type TokenExchangeRequest struct {
	Code         string `json:"code"`
	ClientID     string `json:"client_id"`
	ClientSecret string `json:"client_secret"`
}

type RefreshTokenRequest struct {
	ClientID     string `json:"client_id"`
	ClientSecret string `json:"client_secret"`
	GrantType    string `json:"grant_type"`
	RefreshToken string `json:"refresh_token"`
}

type TokenResponse struct {
	AccessToken           string `json:"access_token"`
	ExpiresIn             int64  `json:"expires_in"`
	RefreshToken          string `json:"refresh_token"`
	RefreshTokenExpiresIn int64  `json:"refresh_token_expires_in"`
}

type GetTokenRequest struct {
	validation.DefaultValidator
	ID string `json:"id"`
}
